import httpRequest from '../../utils/request'
import modules from '../modules'
const defaultRoute = 'ProcessRoute_Process'
const controllerName = 'Process'

export interface ProcessRouteParam {
  ProcessName: string | null
  PageIndex: number
  PageSize: number
  totalCount: number
 
}


// 获取工序列表
export function ApiGetProcessRoute_ProcessPageListAsync(param: ProcessRouteParam) {
  return httpRequest({
    url: `${modules.ProcessRouteModuleUrl}/${controllerName}/Get${defaultRoute}PageList`,
    method: "Post",
    data: param,
  });
}

// 批量删除工序
export function ApiDeletionProcessRoute_ProcessAsync(param: string[]) {
  return httpRequest({
    url: `${modules.ProcessRouteModuleUrl}/${controllerName}/Deletion${defaultRoute}`,
    method: "Post",
    data: param,
  });
}


// 添加工序
export function ApiCreateProcessRoute_ProcessAsync(param: object) {
  return httpRequest({
    url: `${modules.ProcessRouteModuleUrl}/${controllerName}/Create${defaultRoute}`,
    method: "Post",
    data: param,
  });
}


// 更新工序
export function ApiUpdateProcessRoute_ProcessAsync(param: object) {
  return httpRequest({
    url: `${modules.ProcessRouteModuleUrl}/${controllerName}/Update${defaultRoute}`,
    method: "Post",
    data: param,
  });
}